import collections
class Solution(object):
    def countWords(self, words1, words2):
        c1 = collections.Counter(words1)
        c2 = collections.Counter(words2)
        ans = 0
        for key in c1:
            if c1[key] == 1 and c2[key] == 1:
                ans += 1
        return ans